﻿using System;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.ComponentModel;
using Numbers;

namespace System8ToyMC
{
	public partial class AlphaUC : UserControl
	{
		public AlphaUC()
		{
			// Required to initialize variables
			InitializeComponent();
            LayoutRoot.DataContext = this;
		}



        [Category("Numbers")]
        [Description("Name for this alpha panel")]
        public Numbers.Alpha AlphaValue
        {
            get { return (Numbers.Alpha)GetValue(AlphaValueProperty); }
            set { SetValue(AlphaValueProperty, value); }
        }

        // Using a DependencyProperty as the backing store for AlphaValue.  This enables animation, styling, binding, etc...
        public static readonly DependencyProperty AlphaValueProperty =
            DependencyProperty.Register("AlphaValue", typeof(Numbers.Alpha), typeof(AlphaUC), new PropertyMetadata(null));




        [Category("Numbers")]
        [Description("Name for this alpha panel")]
        public Alpha_12 Alpha12Value
        {
            get { return (Alpha_12)GetValue(Alpha12ValueProperty); }
            set { SetValue(Alpha12ValueProperty, value); }
        }

        // Using a DependencyProperty as the backing store for Alpha12Value.  This enables animation, styling, binding, etc...
        public static readonly DependencyProperty Alpha12ValueProperty =
            DependencyProperty.Register("Alpha12Value", typeof(Alpha_12), typeof(AlphaUC), new PropertyMetadata(null));

        /// <summary>
        /// Get/Set the name of this particular alpha.
        /// </summary>
        [Category("Numbers")]
        [Description("Name for this alpha panel")]
        public string AlphaName
        {
            get { return (string)GetValue(AlphaNameProperty); }
            set { SetValue(AlphaNameProperty, value); }
        }

        // Using a DependencyProperty as the backing store for AlphaName.  This enables animation, styling, binding, etc...
        public static readonly DependencyProperty AlphaNameProperty =
            DependencyProperty.Register("AlphaName", typeof(string), typeof(AlphaUC), new PropertyMetadata("Alpha Name"));

        /// <summary>
        /// Holder for the string
        /// </summary>
        private string _path;
        
        /// <summary>
        /// Get/Set the variable path for this Alpha.
        /// </summary>
        public string Path
        {
            get { return _path; }
            set
            {
                _path = value;
                NVAlphaB.Path = _path + "/alpha_bValue";
                NVAlphaC.Path = _path + "/alpha_cValue";
                NVAlphaL.Path = _path + "/alpha_lValue";
                TBAlphaCL.Path = _path + "_cl/ValueValue";
            }
        }
    }
}